<template>
  <div class="container">
    <div class="logo">
      <img class="logo-logo" alt="logo" src="~assets/images/logo.png" />
      <!--      <img class="logo-logo" alt="logo" src="~assets/images/111.png" />-->
      <div class="logo-text" style="">
        <!--        <div class="logo-text-title">科秘档案CMyOffice</div>-->
        <!--        <div class="logo-text-ftitle">KEMISYS</div>-->
        <div class="logo-text-title">科秘档案CMyOffice</div>
        <div class="logo-text-ftitle">KEMISYS</div>
      </div>
    </div>
    <LoginBanner />
    <div class="content">
      <div class="content-inner">
        <LoginForm :infoData="data" @changeQrode="changeArcode()" />
      </div>
      <div class="footer">
        <Footer />
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import Footer from '@/components/footer/index.vue';
  import LoginBanner from './components/banner.vue';
  import LoginForm from './components/login-form.vue';
  import { throttle } from 'lodash';
  import { getCaptcha } from '@/api/user';
  import { getNetWorkDetail } from '@/api/syssetting';
  const data = ref();

  function getArcode() {
    getCaptcha().then((res) => {
      data.value = res.data;
    });
  }
  const throttledGetArcode = throttle(getArcode, 1000);
  function changeArcode() {
    throttledGetArcode();
  }
  onMounted(() => {
    getArcode();
  });
</script>

<style lang="less" scoped>
  .container {
    display: flex;
    height: 100vh;

    .banner {
      width: 550px;
      background: linear-gradient(163.85deg, #1d2129 0%, #00308f 100%);
    }

    .content {
      position: relative;
      display: flex;
      flex: 1;
      align-items: center;
      justify-content: center;
      padding-bottom: 40px;
      &-inner {
        transform: scale(1.1);
      }
    }
    .footer {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 100%;
    }
  }

  .logo {
    position: fixed;
    top: 24px;
    left: 22px;
    z-index: 1;
    display: flex;
    align-items: center;
    &-logo {
      height: 80px;
    }
    &-text {
      margin-right: 4px;
      margin-left: 4px;
      color: var(--color-fill-1);
      font-size: 20px;
      &-title {
        font-size: 30px;
      }
      &-ftitle {
        margin-top: 10px;
        letter-spacing: 8px;
      }
    }
  }
</style>

<style lang="less" scoped>
  // responsive
  @media (max-width: @screen-lg) {
    .container {
      .banner {
        width: 25%;
      }
    }
  }
</style>
